const Mock = require("mockjs");
// mock里面的方法必须小写
Mock.mock("/news/article", "get", () => {
  return {
    state: "ok",
    data: {
      title: "这是新闻",
      content: "这是新闻内容",
    },
  };
});

Mock.mock("http://api.cpengx.cn/finance/api/nav/navList", "get", () => {
  return {
    message: "ok",
    navList: [
      { title: "大盘行情", imgSrc: "./imgs/nav1.png", linkto: "" },
      { title: "股票组合", imgSrc: "./imgs/nav2.png", linkto: "" },
      {
        title: "股票开户",
        imgSrc:
          "https://tse1-mm.cn.bing.net/th/id/R-C.15a1ba773a211acdeae39f83c2c13241?rik=h1wkOstFSHzvTg&riu=http%3a%2f%2fwww.desktx.com%2fd%2ffile%2fwallpaper%2fscenery%2f20170120%2ffdf948c82074494a74bf258eed4f855d.jpg&ehk=fYrgVtm0hD0sZn455mcVyf5k%2bQz7RScjHLMyUi6jG0A%3d&risl=&pid=ImgRaw&r=0",
        linkto: "",
      },
      { title: "选股攻略", imgSrc: "./imgs/nav4.png", linkto: "" },
      { title: "指数选基", imgSrc: "./imgs/nav5.png", linkto: "" },
      { title: "基金组合", imgSrc: "./imgs/nav6.png", linkto: "" },
      { title: "私募基金", imgSrc: "./imgs/nav7.png", linkto: "" },
      { title: "基金必看", imgSrc: "", linkto: "" },
    ],
  };
});
